Class: GOBL::Bill::Order
- Defined in:
- lib/generated/gobl/bill/order.rb
Overview
Order documents are used for the initial part of a order-to-invoice process where the buyer requests goods or services from the seller.
Constant Summary collapse
- SCHEMA_ID =
The Schema ID of the GOBL Order structure
'https://gobl.org/draft-0/bill/order'- TYPE_ENUM =
Enumeration of possible values for #type with their corresponding descriptions
{ 'purchase' => 'A purchase order is a document that a buyer sends to a seller to request goods or services.', 'sale' => 'A sales order is a document that a seller sends to a buyer to confirm the sale of goods or services.', 'quote' => 'A quote is a document that a seller sends to a buyer to provide a price for goods or services.' }.freeze
Instance Attribute Summary collapse
-
#$addons($addons) ⇒ Array<GOBL::CBC::Key>
readonly
Addons defines a list of keys used to identify tax addons that apply special normalization, scenarios, and validation rules to a document.
- #$regime($regime) ⇒ GOBL::L10n::TaxCountryCode readonly
-
#$tags($tags) ⇒ Array<GOBL::CBC::Key>
readonly
Tags are used to help identify specific tax scenarios or requirements that may apply changes to the contents of the document or imply a specific meaning.
-
#attachments ⇒ Array<GOBL::Org::Attachment>
readonly
Attachments provide additional information or supporting documents that are not included in the main document.
-
#buyer ⇒ GOBL::Org::Party
readonly
Party who is responsible for issuing payment, if not the same as the customer.
-
#charges ⇒ Array<GOBL::Bill::Charge>
readonly
Charges or surcharges applied to order totals.
-
#code ⇒ GOBL::CBC::Code
readonly
Code is a sequential identifier that uniquely identifies the order.
-
#complements ⇒ Array<GOBL::Schema::Object>
readonly
Additional complementary objects that add relevant information to the order.
-
#contracts ⇒ Array<GOBL::Org::DocumentRef>
readonly
The identification of contracts.
-
#currency ⇒ GOBL::Currency::Code
readonly
Currency for all invoice totals.
-
#customer ⇒ GOBL::Org::Party
readonly
Legal entity receiving the goods or services, may be nil in certain circumstances such as simplified invoices.
-
#delivery ⇒ GOBL::Bill::DeliveryDetails
readonly
Specific details on delivery of the goods to copy to the final invoice.
-
#discounts ⇒ Array<GOBL::Bill::Discount>
readonly
Discounts or allowances applied to order totals.
-
#exchange_rates ⇒ Array<GOBL::Currency::ExchangeRate>
readonly
Exchange rates to be used when converting the invoices monetary values into other currencies.
-
#identities ⇒ Array<GOBL::Org::Identity>
readonly
Additional codes, IDs, SKUs, or other regional or custom identifiers that may be used to identify the order.
-
#issue_date ⇒ GOBL::Cal::Date
readonly
When the invoice was created.
-
#issue_time ⇒ GOBL::Cal::Time
readonly
IssueTime is an optional field that may be useful to indicate the time of day when the order was issued.
-
#lines ⇒ Array<GOBL::Bill::Line>
readonly
List of lines representing each of the items to be ordered.
-
#meta ⇒ GOBL::CBC::Meta
readonly
Additional semi-structured data that doesn’t fit into the body of the order.
-
#notes ⇒ Array<GOBL::Org::Note>
readonly
Unstructured information that is relevant to the order, such as correction or additional legal details.
-
#op_date ⇒ GOBL::Cal::Date
readonly
Date when the operation defined by the invoice became effective.
-
#payment ⇒ GOBL::Bill::PaymentDetails
readonly
Information on when, how, and to whom a final invoice would be paid.
-
#period ⇒ GOBL::Cal::Period
readonly
Period of time in which the order is valid.
-
#preceding ⇒ Array<GOBL::Org::DocumentRef>
readonly
Key information regarding previous order documents.
-
#seller ⇒ GOBL::Org::Party
readonly
Seller is the party liable to pay taxes on the transaction if not the same as the supplier.
-
#series ⇒ GOBL::CBC::Code
readonly
Series is used to identify groups of orders by date, business area, project, type, customer, a combination of any, or other company specific data.
-
#supplier ⇒ GOBL::Org::Party
readonly
The entity supplying the goods or services and usually responsible for paying taxes.
-
#tax ⇒ GOBL::Bill::Tax
readonly
Special tax configuration for billing.
-
#totals ⇒ GOBL::Bill::Totals
readonly
Summary of all the order totals, including taxes (calculated).
-
#type ⇒ GOBL::CBC::Key
readonly
Type of the order.
-
#uuid ⇒ String
readonly
Universally Unique Identifier.
-
#value_date ⇒ GOBL::Cal::Date
readonly
When the taxes of this invoice become accountable, if none set, the issue date is used.
Method Summary
Methods inherited from Object
Methods inherited from Struct
#as_json, from_data, from_json!, #to_json
Instance Attribute Details
#$addons($addons) ⇒ Array<GOBL::CBC::Key> (readonly)
Addons defines a list of keys used to identify tax addons that apply special normalization, scenarios, and validation rules to a document.
49 |
# File 'lib/generated/gobl/bill/order.rb', line 49 property :$addons, [GOBL::CBC::Key] |
#$regime($regime) ⇒ GOBL::L10n::TaxCountryCode (readonly)
43 |
# File 'lib/generated/gobl/bill/order.rb', line 43 property :$regime, GOBL::L10n::TaxCountryCode |
#$tags($tags) ⇒ Array<GOBL::CBC::Key> (readonly)
Tags are used to help identify specific tax scenarios or requirements that may apply changes to the contents of the document or imply a specific meaning. Converters may use tags to help identify specific situations that do not have a specific extension, for example; self-billed or partial invoices may be identified by their respective tags.
54 |
# File 'lib/generated/gobl/bill/order.rb', line 54 property :$tags, [GOBL::CBC::Key] |
#attachments ⇒ Array<GOBL::Org::Attachment> (readonly)
Attachments provide additional information or supporting documents that are not included in the main document. It is important that attachments are not used for alternative versions of the PDF, for that, see “links” inside the envelope headers.
208 |
# File 'lib/generated/gobl/bill/order.rb', line 208 property :attachments, [GOBL::Org::Attachment] |
#buyer ⇒ GOBL::Org::Party (readonly)
Party who is responsible for issuing payment, if not the same as the customer.
153 |
# File 'lib/generated/gobl/bill/order.rb', line 153 property :buyer, GOBL::Org::Party |
#charges ⇒ Array<GOBL::Bill::Charge> (readonly)
Charges or surcharges applied to order totals
173 |
# File 'lib/generated/gobl/bill/order.rb', line 173 property :charges, [GOBL::Bill::Charge] |
#code ⇒ GOBL::CBC::Code (readonly)
Code is a sequential identifier that uniquely identifies the order. The code can be left empty initially, but is required to sign the document.
82 |
# File 'lib/generated/gobl/bill/order.rb', line 82 property :code, GOBL::CBC::Code |
#complements ⇒ Array<GOBL::Schema::Object> (readonly)
Additional complementary objects that add relevant information to the order.
198 |
# File 'lib/generated/gobl/bill/order.rb', line 198 property :complements, [GOBL::Schema::Object] |
#contracts ⇒ Array<GOBL::Org::DocumentRef> (readonly)
The identification of contracts.
117 |
# File 'lib/generated/gobl/bill/order.rb', line 117 property :contracts, [GOBL::Org::DocumentRef] |
#currency ⇒ GOBL::Currency::Code (readonly)
Currency for all invoice totals.
107 |
# File 'lib/generated/gobl/bill/order.rb', line 107 property :currency, GOBL::Currency::Code |
#customer ⇒ GOBL::Org::Party (readonly)
Legal entity receiving the goods or services, may be nil in certain circumstances such as simplified invoices.
148 |
# File 'lib/generated/gobl/bill/order.rb', line 148 property :customer, GOBL::Org::Party |
#delivery ⇒ GOBL::Bill::DeliveryDetails (readonly)
Specific details on delivery of the goods to copy to the final invoice.
183 |
# File 'lib/generated/gobl/bill/order.rb', line 183 property :delivery, GOBL::Bill::DeliveryDetails |
#discounts ⇒ Array<GOBL::Bill::Discount> (readonly)
Discounts or allowances applied to order totals
168 |
# File 'lib/generated/gobl/bill/order.rb', line 168 property :discounts, [GOBL::Bill::Discount] |
#exchange_rates ⇒ Array<GOBL::Currency::ExchangeRate> (readonly)
Exchange rates to be used when converting the invoices monetary values into other currencies.
112 |
# File 'lib/generated/gobl/bill/order.rb', line 112 property :exchange_rates, [GOBL::Currency::ExchangeRate] |
#identities ⇒ Array<GOBL::Org::Identity> (readonly)
Additional codes, IDs, SKUs, or other regional or custom identifiers that may be used to identify the order.
127 |
# File 'lib/generated/gobl/bill/order.rb', line 127 property :identities, [GOBL::Org::Identity] |
#issue_date ⇒ GOBL::Cal::Date (readonly)
When the invoice was created.
87 |
# File 'lib/generated/gobl/bill/order.rb', line 87 property :issue_date, GOBL::Cal::Date |
#issue_time ⇒ GOBL::Cal::Time (readonly)
IssueTime is an optional field that may be useful to indicate the time of day when the order was issued. Some regions and formats may require this field to be set. An empty string will be automatically updated to reflect the current time, otherwise the field can be left with a nil value.
92 |
# File 'lib/generated/gobl/bill/order.rb', line 92 property :issue_time, GOBL::Cal::Time |
#lines ⇒ Array<GOBL::Bill::Line> (readonly)
List of lines representing each of the items to be ordered.
163 |
# File 'lib/generated/gobl/bill/order.rb', line 163 property :lines, [GOBL::Bill::Line] |
#meta ⇒ GOBL::CBC::Meta (readonly)
Additional semi-structured data that doesn’t fit into the body of the order.
203 |
# File 'lib/generated/gobl/bill/order.rb', line 203 property :meta, GOBL::CBC::Meta |
#notes ⇒ Array<GOBL::Org::Note> (readonly)
Unstructured information that is relevant to the order, such as correction or additional legal details.
193 |
# File 'lib/generated/gobl/bill/order.rb', line 193 property :notes, [GOBL::Org::Note] |
#op_date ⇒ GOBL::Cal::Date (readonly)
Date when the operation defined by the invoice became effective.
97 |
# File 'lib/generated/gobl/bill/order.rb', line 97 property :op_date, GOBL::Cal::Date |
#payment ⇒ GOBL::Bill::PaymentDetails (readonly)
Information on when, how, and to whom a final invoice would be paid.
178 |
# File 'lib/generated/gobl/bill/order.rb', line 178 property :payment, GOBL::Bill::PaymentDetails |
#period ⇒ GOBL::Cal::Period (readonly)
Period of time in which the order is valid.
132 |
# File 'lib/generated/gobl/bill/order.rb', line 132 property :period, GOBL::Cal::Period |
#preceding ⇒ Array<GOBL::Org::DocumentRef> (readonly)
Key information regarding previous order documents.
122 |
# File 'lib/generated/gobl/bill/order.rb', line 122 property :preceding, [GOBL::Org::DocumentRef] |
#seller ⇒ GOBL::Org::Party (readonly)
Seller is the party liable to pay taxes on the transaction if not the same as the supplier.
158 |
# File 'lib/generated/gobl/bill/order.rb', line 158 property :seller, GOBL::Org::Party |
#series ⇒ GOBL::CBC::Code (readonly)
Series is used to identify groups of orders by date, business area, project, type, customer, a combination of any, or other company specific data. If the output format does not support the series as a separate field, it will be prepended to the code for presentation with a dash (‘-`) for separation.
77 |
# File 'lib/generated/gobl/bill/order.rb', line 77 property :series, GOBL::CBC::Code |
#supplier ⇒ GOBL::Org::Party (readonly)
The entity supplying the goods or services and usually responsible for paying taxes.
142 |
# File 'lib/generated/gobl/bill/order.rb', line 142 property :supplier, GOBL::Org::Party |
#tax ⇒ GOBL::Bill::Tax (readonly)
Special tax configuration for billing.
137 |
# File 'lib/generated/gobl/bill/order.rb', line 137 property :tax, GOBL::Bill::Tax |
#totals ⇒ GOBL::Bill::Totals (readonly)
Summary of all the order totals, including taxes (calculated).
188 |
# File 'lib/generated/gobl/bill/order.rb', line 188 property :totals, GOBL::Bill::Totals |
#type ⇒ GOBL::CBC::Key (readonly)
Type of the order.
71 |
# File 'lib/generated/gobl/bill/order.rb', line 71 property :type, GOBL::CBC::Key |
#uuid ⇒ String (readonly)
Universally Unique Identifier.
59 |
# File 'lib/generated/gobl/bill/order.rb', line 59 property :uuid, String |
#value_date ⇒ GOBL::Cal::Date (readonly)
When the taxes of this invoice become accountable, if none set, the issue date is used.
102 |
# File 'lib/generated/gobl/bill/order.rb', line 102 property :value_date, GOBL::Cal::Date |